package define;

public enum FunctionType 
{
	E_FOR_FT("for"),
	E_IF_FT("if"),
	E_SWITCH_FT("switch"),
	E_SET_FT("set"),
	E_EXE_FT("exe"),
	E_REPLACE_FT("replace"),
	E_SPLIT_FT("split"),
	E_SUB_FT("sub"),
	E_CALL_FT("call"),
	E_RECEIVE_FT("rec"),
	E_PAUSE_FT("pause"),
	E_BREAK_FT("break"),
	E_COM_FT("com"),
	E_SAVE_FT("save"),
	E_APPEND_FT("append"),
	E_XML_FT("xml"),
	E_LMX_FT("lmx"),
	E_CODE_FT("code"),
	E_COPY_FT("copy"),
	E_FUN_FT("func"),
	E_FONT_FT("font"),
	E_FONT_OUT_FT("buildf"),
	E_CONFIG_FT("config"),
	E_ADD_FT("add"),
	E_DEL_FT("del"),
	E_ATLAS_FT("atlas"),
	E_ATLAS_OUT_FT("builda"),
	;
	
	private String m_keyword;
	
	private FunctionType(String keyword)
	{
		m_keyword = keyword;
	}
	
	public String getKeyword()
	{
		return m_keyword;
	}
	
	public static FunctionType hasFunction(String keyword)
	{
		keyword = keyword.toLowerCase();
		for(FunctionType ft: FunctionType.values())
		{
			if(ft.getKeyword().compareTo(keyword) == 0)
			{
				return ft;
			}
		}
		return null;
	}
}
